<style lang="less" scope>
.divSty{
    table {
        border: 1px solid green;
        border-collapse: collapse;
    }
    
    td {
        border: 1px solid green;
    }
}
    
</style>
<template>
    <Modal
        v-model="drawer.show" transfer
        :title="lang.detail"
        :width="width"
        class-name="cm-modal-resize"
        :z-index="zIndex"
        :draggable="true"
        :closable="true"
        :mask-closable="false"
        @on-ok="ok">
        <span slot="header" :style="titleStyle">{{lang.preview }}</span>
        <div v-if="drawer.show" class="cm-modal-content">
           <iframe style="width:100%;height:900px;" :src="src" class="_iframe"></iframe>
        </div>
        <template slot="footer">
            <!-- 对于具有验证，点击提交不能消失的对话框，必须使用这种插槽的用法 -->
            <Button type="text" @click="drawer.show=false">{{lang.close}}</Button>
      </template>
    </Modal>
</template>
<script>
    export default {
        data () {
            return {

            }
        },
        props: {
            drawer: {
                default: () => {
                    return {
                        show: false
                    };
                }
            },
            width: {
                default: () => {
                    return 1024;
                }
            },
            zIndex: {
                default: () => {
                    return 100;
                }
            },
            titleStyle: {
                default: () => {
                    return {}
                }
            },
            src: {
                default: () => {
                    return '';
                }
            },
        },
        computed: {
            lang () {
                return {
                    'en-US': {
                        edit: 'edit',
                        new: 'new',
                        preview:'preview',
                        detail: 'detail',
                        action: 'action',
                        submit: 'submit',
                        close: 'close',
                        save: 'save'
                    },
                    'zh-CN': {
                        edit: '编辑',
                        new: '添加',
                        preview:'预览',
                        detail: '查看',
                        action: '操作',
                        submit: '提交',
                        close: '关闭',
                        save: '确定'
                    }
                }[this.G_Locale]
            }
        },
        methods: {
            ok(){

            }
        }
    }
</script>
